package fanXing;

public class Printer<T> {
    T youWant;

    public Printer(T youWant){
        this.youWant = youWant;
    }

    public void print(){
        System.out.println(this.youWant);
    }

    public static void main(String[] args) {
        Printer<Integer> printer1 = new Printer<>(20);
        printer1.print();

        Printer<Double> printer2 = new Printer<>(23.6);
        printer2.print();
    }
}
